#
# This is an example Makefile for a countwords program.  This
# program uses both the scanner module and a counter module.
# Typing 'make' or 'make count' will create the executable file.
#

# define some Makefile variables for the compiler and compiler flags
# to use Makefile variables later in the Makefile: $()
#
#  -g    adds debugging information to the executable file
#  -Wall turns on most, but not all, compiler warnings
#
CC = gcc
CFLAGS  = -g -Wall

# typing 'make' will invoke the first target entry in the file 
# (in this case the default target entry)
#
default: syscviz

# To create the executable file count we need the object files
# countwords.o, counter.o, and scanner.o:
#
syscviz: ChannelData.o ChannelDataInfo.o CustomExport.o Export.o ModuleData.o PortData.o Process.o tinystr.o tinyxml.o tinyxmlerror.o tinyxmlparser.o XMLExport.o
		$(CC) $(CFLAGS) -o syscviz ChannelData.o ChannelDataInfo.o CustomExport.o Export.o ModuleData.o PortData.o Process.o tinystr.o tinyxml.o tinyxmlerror.o tinyxmlparser.o XMLExport.o


ChannelData.o:   ChannelData.c ChannelData.h
                $(CC) $(CFLAGS) -c ChannelData.c


ChannelDataInfo.o:      ChannelDataInfo.c ChannelDataInfo.h ModuleData.h
                $(CC) $(CFLAGS) -c ChannelDataInfo.c


CustomExport.o:      CustomExport.c CustomExport.h XMLExport.h
                $(CC) $(CFLAGS) -c CustomExport.c
				
Export.o:      Export.c Export.h ModuleData.h ChannelData.h ChannelDataInfo.h tinyxml.h
                $(CC) $(CFLAGS) -c Export.c
				
ModuleData.o:      ModuleData.c ModuleData.h ChannelData.h Process.h PortData.h
                $(CC) $(CFLAGS) -c ModuleData.c

PortData.o:      PortData.c PortData.h
                $(CC) $(CFLAGS) -c PortData.c		

Process.o:      Process.c Process.h
                $(CC) $(CFLAGS) -c Process.c		
				
tinystr.o:      tinystr.c tinystr.h
                $(CC) $(CFLAGS) -c tinystr.c		

tinyxml.o:      tinyxml.c tinyxml.h
                $(CC) $(CFLAGS) -c tinyxml.c		
				
tinyxmlerror.o:      tinyxmlerror.c tinyxml.h
                $(CC) $(CFLAGS) -c tinyxml.c	
				
tinyxmlparser.o:      tinyxmlparser.c tinyxml.h
                $(CC) $(CFLAGS) -c tinyxml.c	
				
XMLExport.o:  XMLExport.c XMLExport.h tinyxml.h
                $(CC) $(CFLAGS) -c tinyxml.c	

# To start over from scratch, type 'make clean'.  This
# removes the executable file, as well as old .o object
# files and *~ backup files:
#
clean:
                rm -f count *.o *~
